######################################################## 
## ~W:	Forum Icon with ACP Control (Default) Qת ϥ (w]Ϥ覡)
## ~@:	ycl6 < ycl6@users.sourceforge.net > (Y.C. LIN) http://macphpbbmod.sourceforge.net/
##
## ~yz:	oӥ~iH޲zbxwUӰQתϥ
##		Mܦb indexBviewforum M viewtopic
## ~:	1.0.9
## 
## w:	
## wˮɶ:	10 
##
## ݭns誺ɮ:	10
##	index.php
##	viewforum.php
##	viewtopic.php
##	admin/admin_forums.php
##	language/lang_chinese_traditional_taiwan/lang_admin.php
##	templates/subSilver/admin/forum_admin_body.tpl
##	templates/subSilver/admin/forum_edit_body.tpl
##	templates/subSilver/index_body.tpl
##	templates/subSilver/viewforum_body.tpl
##	templates/subSilver/viewtopic_body.tpl
##
## [ɮ: 		n/a
##
################################################################# 
## ѩwWҶqAˬd: 
## http://www.phpbb.com/mods/downloads/ O_~̷s 
## qLaUɥi|yAbA phpBB QתWgJ~{X 
## oӲzѡAphpBB N|Sæbڭ̪~Ʈw~Ѥ䴩 
## ڭ̪~Ʈwb http://www.phpbb.com/mods/downloads/
## 
## vn: o@ӥ~iHZnbΥ[JDx誺 phpBB 
############################################################## 
## @̯d:
##	b 2.0.14 աAib 2.0.6+ Wϥ
##
##	pGAQβM (LIST BOX) Ϥ覡,
##	AϥΦb Forum_Icon_ListBox_tw.txt w˫. 
##	ФŨϥΥHUw˫! Au䤤@تϤ覡.
## 
############################################################## 
## v: 
##
##   2003-11-04 -  1.0.0
##      - oG
##
##   2003-11-08 -  1.0.1
##      - TwiHb 2.0.6 WϥΡA{XSܰ
##
##   2003-11-15 -  1.0.2
##      - w˫ܸgLקHŦX phpBB MOD Database nD
##
##   2003-12-01 -  1.0.3
##      - ϥܥiHβM (Ϥ覡 2)
##	- b޲zDiHܪϥ
##	- b viewforum.php iHܪϥ
##
##   2004-02-11 -  1.0.4
##      - ץϥܤeN]{HĤ@ιϥ
##		ϥιw]Ϥ覡B̤ͭݭns
##
##   2004-03-13 -  1.0.5
##      - ץϥܤeN]{HĤ@إߪ
##		ϥιw]Ϥ覡B̤ͭݭns
##
##   2004-05-29 -  1.0.6
##      - w˫ܸgLקHŦX phpBB MOD Database nD
##
##   2004-08-15 -  1.0.7
##	- b viewtopic.php iHܪϥ
##	- lang_admin.php 
##
##   2005-05-03 -  1.0.8
##	- ץϥܦbs誩ɦ^йw]ﶵ ( obiku ^)
##	- * w]Ϥ覡åss *
##
##   2005-05-09 -  1.0.9
##	- ץ $forum_icons_list ̪@Ӥp~
##	- * w]Ϥ覡åss *
## 
############################################################## 
## bW[~e, аȥƥҦݭnק諸ɮ
##############################################################
# 
#-----[ SQL ]------------------------------------------ 
#
# аOoק令AƮwW
ALTER TABLE `phpbb_forums` ADD `forum_icon` VARCHAR( 255 ) default NULL;

# 
#-----[ } ]------------------------------------------ 
# 
language/lang_chinese_traditional_taiwan/lang_admin.php

# 
#-----[ M ]------------------------------------------ 
#
$lang['Forum_status'] = 'A';

# 
#-----[ , [W ]------------------------------------------ 
#
$lang['Forum_icon'] = 'Ϲϥ'; // Forum Icon MOD
$lang['Forum_icon'] = 'Ϲϥ<br /><span class="gensmall">e.g. pGAϤ <b>phpBBRoot/images/forum_icon/test.gif</b><br /> K]w <b>images/forum_icon/test.gif</b></span>'; // Forum Icon MOD

# 
#-----[ } ]------------------------------------------ 
#  
admin/admin_forums.php

# 
#-----[ M ]------------------------------------------ 
# 
				$forumstatus = $row['forum_status'];


# 
#-----[ , [W ]------------------------------------------ 
# 
				$forumicon = $row['forum_icon']; // Forum Icon MOD

# 
#-----[ M ]------------------------------------------ 
# 
				$forumstatus = FORUM_UNLOCKED;

# 
#-----[ , [W ]------------------------------------------ 
# 
				$forumicon = ''; // Forum Icon MOD

# 
#-----[ M ]------------------------------------------ 
# 
				'L_FORUM_STATUS' => $lang['Forum_status'],

# 
#-----[ , [W ]------------------------------------------ 
# 
				'L_FORUM_ICON' => $lang['Forum_icon'], // Forum Icon MOD

# 
#-----[ M ]------------------------------------------ 
#
				'DESCRIPTION' => $forumdesc)

# 
#-----[ N ]------------------------------------------ 
#
				'DESCRIPTION' => $forumdesc,
				'ICON' => ( $forumicon ) ? $forumicon : '', // Forum Icon MOD 
				'ICON_DISPLAY' => ( $forumicon ) ? '<img src="' . $phpbb_root_path . $forumicon . '" />' : '' // Forum Icon MOD 
				)

# 
#-----[ M ]------------------------------------------ 
#
			// There is no problem having duplicate forum names so we won't check for it.
			$sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")

# 
#-----[ , M ]------------------------------------------ 
#
forum_status

# 
#-----[ , [W ]------------------------------------------ 
#
, forum_icon

# 
#-----[ M ]------------------------------------------ 
#
				VALUES ('" . $next_id . "', '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', $next_order, " . intval($HTTP_POST_VARS['forumstatus']) . ", " . intval($HTTP_POST_VARS['prune_enable']) . $value_sql . ")";

# 
#-----[ , M ]------------------------------------------ 
#
, " . intval($HTTP_POST_VARS['forumstatus']) . "

# 
#-----[ , [W ]------------------------------------------ 
#
, '" . str_replace("\'", "''", $HTTP_POST_VARS['forumicon']) . "'

# 
#-----[ M ]------------------------------------------ 
#
			$sql = "UPDATE " . FORUMS_TABLE . "
				SET forum_name = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumname']) . "', cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumdesc']) . "', forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . ", prune_enable = " . intval($HTTP_POST_VARS['prune_enable']) . "
				WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
# 
#-----[ , M ]------------------------------------------ 
#
, forum_status = " . intval($HTTP_POST_VARS['forumstatus']) . "

# 
#-----[ , [W ]------------------------------------------ 
#
, forum_icon = '" . str_replace("\'", "''", $HTTP_POST_VARS['forumicon']) . "'

# 
#-----[ M ]------------------------------------------ 
# 
					'FORUM_DESC' => $forum_rows[$j]['forum_desc'],

# 
#-----[ , [W ]------------------------------------------ 
# 
					'FORUM_ICON_IMG' => ( $forum_rows[$j]['forum_icon'] ) ? '<img src="' . $phpbb_root_path . $forum_rows[$j]['forum_icon'] . '" alt="'.$forum_data[$j]['forum_name'].'" title="'.$forum_data[$j]['forum_name'].'" />' : '', // Forum Icon Mod

# 
#-----[ } ]------------------------------------------ 
#  
index.php

# 
#-----[ M ]------------------------------------------ 
# 
							$posts = $forum_data[$j]['forum_posts'];
							$topics = $forum_data[$j]['forum_topics'];

# 
#-----[ , [W ]------------------------------------------ 
# 
							$icon = $forum_data[$j]['forum_icon'];	// Forum Icon Mod

# 
#-----[ M ]------------------------------------------ 
# 
								'FORUM_FOLDER_IMG' => $folder_image, 

# 
#-----[ , [W ]------------------------------------------ 
# 
								'FORUM_ICON_IMG' => ($icon) ? '<img src="' . $phpbb_root_path . $icon . '" alt="'.$forum_data[$j]['forum_name'].'" title="'.$forum_data[$j]['forum_name'].'" />' : '',	// Forum Icon Mod

# 
#-----[ } ]------------------------------------------ 
#  
viewforum.php

# 
#-----[ M ]------------------------------------------ 
# 
	'FORUM_NAME' => $forum_row['forum_name'],

# 
#-----[ , [W ]------------------------------------------ 
# 
	'FORUM_ICON_IMG' => ($forum_row['forum_icon']) ? '<img src="' . $phpbb_root_path . $forum_row['forum_icon'] . '" alt="'.$forum_row['forum_name'].'" title="'.$forum_row['forum_name'].'" />&nbsp;' : '',	// Forum Icon Mod

# 
#-----[ } ]------------------------------------------ 
#  
viewtopic.php

# 
#-----[ M ]------------------------------------------ 
# 
//
// End auth check
//

# 
#-----[ , [W ]------------------------------------------ 
# 
// Forum Icon Mod
$sql = "SELECT forum_icon
	FROM " . FORUMS_TABLE . "
	WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
$forum_row = $db->sql_fetchrow($result);
$forum_icon = $forum_row['forum_icon'];

# 
#-----[ M ]------------------------------------------ 
# 
	'FORUM_NAME' => $forum_name,

# 
#-----[ , [W ]------------------------------------------ 
# 
	'FORUM_ICON_IMG' => ($forum_icon) ? '<img src="' . $phpbb_root_path . $forum_icon . '" alt="'.$forum_name.'" title="'.$forum_name.'" />&nbsp;' : '',	// Forum Icon Mod

# 
#-----[ } ]------------------------------------------ 
#  
templates/subSilver/admin/forum_edit_body.tpl

# 
#-----[ M ]------------------------------------------ 
# 
	<tr> 
	  <td class="row1">{L_FORUM_NAME}</td> 
	  <td class="row2"><input type="text" size="25" name="forumname" value="{FORUM_NAME}" class="post" /></td> 
	</tr> 

# 
#-----[ , [W ]------------------------------------------ 
# 
	<tr> 
	  <td class="row1">{L_FORUM_ICON}</td>
	  <td class="row2"><input type="text" size="35" name="forumicon" value="{ICON}" class="post" />&nbsp;&nbsp;&nbsp;{ICON_DISPLAY}</td>
	</tr>

# 
#-----[ } ]------------------------------------------ 
#  
templates/subSilver/admin/forum_admin_body.tpl

# 
#-----[ M ]------------------------------------------ 
# 
		<td class="row2"><span class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></span><br /><span class="gensmall">{catrow.forumrow.FORUM_DESC}</span></td>

# 
#-----[ , M ]------------------------------------------ 
#
		<td class="row2"><span class="gen">

# 
#-----[ , [W ]------------------------------------------ 
# 
{catrow.forumrow.FORUM_ICON_IMG}&nbsp;&nbsp;

# 
#-----[ } ]------------------------------------------ 
# 
templates/subSilver/index_body.tpl

# 
#-----[ M ]------------------------------------------ 
# 
	<th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>

# 
#-----[ , M ]------------------------------------------ 
#
colspan="2"

# 
#-----[ N ]------------------------------------------ 
# 
colspan="3"

# 
#-----[ M ]------------------------------------------ 
#
	<td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>

# 
#-----[ , M ]------------------------------------------ 
#
colspan="2"

# 
#-----[ N ]------------------------------------------ 
#
colspan="3"

# 
#-----[ M ]------------------------------------------ 
#
	<td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>

# 
#-----[ , [W ]------------------------------------------ 
#
	<td class="row1" align="center" valign="middle" height="50">{catrow.forumrow.FORUM_ICON_IMG}</td>

# 
#-----[ } ]------------------------------------------ 
# 
templates/subSilver/viewforum_body.tpl

# 
#-----[ M ]------------------------------------------ 
# 
	  <td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_FORUM}">{FORUM_NAME}</a>

# 
#-----[ , M ]------------------------------------------ 
#
	  <td align="left" valign="bottom" colspan="2">

# 
#-----[ , [W ]------------------------------------------ 
# 
{FORUM_ICON_IMG}

# 
#-----[ } ]------------------------------------------ 
# 
templates/subSilver/viewtopic_body.tpl

# 
#-----[ M ]------------------------------------------ 
# 
	  -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>

# 
#-----[ , M ]------------------------------------------ 
#
<a href="{U_VIEW_FORUM}" class="nav">

# 
#-----[ e, [W ]------------------------------------------ 
# 
{FORUM_ICON_IMG}

# 
#-----[ xs/Ҧɮ ]------------------------------------------ 
# 
# ~ץ
